package com.ctosb.classviewer.clazz.attr;

import com.ctosb.classviewer.ClassReader;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 *
 */
@Data
@Accessors(chain = true)
public class StackMapTable_attribute extends Attribute_info {

    private short number_of_entries;
    private Stack_map_frame entries[];

    @Override
    public void doParse(ClassReader classReader) {
        number_of_entries = classReader.readShort();
        entries = new Stack_map_frame[number_of_entries & 0xffff];
        for (int i = 0; i < entries.length; i++) {
            entries[i] = new Stack_map_frame().parse(classReader, getClassFile());
        }
    }
}
